﻿<%@ Page Language="C#" MasterPageFile="~/mychau_admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="HangSanXuat.aspx.cs" Inherits="mychau_admin_common_HangSanXuat" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <h3>
            Quản lý chuyên mục hãng sản xuất</h3>
    </div>
    <div>
        <div>
            <asp:Label ID="lblAddOrEdit" runat="server"></asp:Label>
        </div>
        <div>
            <asp:Panel ID="pnlAddHangSanXuat" runat="server">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lblTitleAdd" runat="server" Text="Tên hãng sản xuất"></asp:Label>
                            </td>
                        <td>
                            <asp:TextBox ID="txtTitleAdd" runat="server" />
                            </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblAddressAdd" runat="server" Text="Địa chỉ"></asp:Label>
                            </td>
                        <td>
                            <asp:TextBox ID="txtAddressAdd" runat="server" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="btnAddHSX" runat="server" OnClick="btnAddHSX_Click" Text="Thêm" />
                            <asp:Button ID="btnCancelAddHSX" runat="server" Text="Nhập lại" OnClick="btnCancelAddHSX_Click" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="pnlEditHSX" runat="server">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lblTitleEdit" runat="server" Text="Tên hãng sản xuất" /></td>
                        <td>
                            <asp:TextBox ID="txtTitleEdit" runat="server" /></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblAddressEdit" runat="server" Text="Địa chỉ" /></td>
                        <td>
                            <asp:TextBox ID="txtAddressEdit" runat="server" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="btnEditHSX" runat="server" Text="Sửa" OnClick="btnEditHSX_Click" />
                            <asp:Button ID="btnCancelEditHSX" runat="server" Text="Hủy" OnClick="btnCancelEditHSX_Click" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </div>
        <p style="color: Red;">
            <asp:Label ID="lblError" runat="server"></asp:Label>
        </p>
        <div>
            <asp:DataList ID="dtlHangSanXuat" runat="server" DataKeyField="ID" OnDeleteCommand="dtlHangSanXuat_DeleteCommand"
                OnEditCommand="dtlHangSanXuat_EditCommand">
                <HeaderTemplate>
                    <table class="viewTable">
                        <tr>
                            <th>
                                Sửa
                            </th>
                            <th>
                                Xóa
                            </th>
                            <th>
                                Mã hãng sản xuất
                            </th>
                            <th>
                                Tên hãng sản xuất
                            </th>
                            <th>
                                Địa chỉ
                            </th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="Edit">
                                <asp:Image ID="imgEdit" runat="server" ImageUrl="~/images/Img_Admin/edit.gif" /></asp:LinkButton>
                        </td>
                        <td>
                            <asp:LinkButton ID="lbtnDelete" runat="server" CommandName="Delete" Style="position: relative"
                                OnClientClick="return confirm('Are you sure want delete this category?');">
                                <asp:Image ID="imgDelete" runat="server" ImageUrl="~/images/Img_Admin/delete.gif" /></asp:LinkButton>
                        </td>
                        <td>
                            <asp:Label ID="lblMenuID" Text='<%#Eval("ID") %>' runat="server"></asp:Label>
                        </td>
                        <td>
                            <%#Eval("title")%>
                        </td>
                        <td>
                            <%#Eval("address") %>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:DataList>
        </div>
    </div>
</asp:Content>
